'''
IO 多路复用方法 select
'''
from select import select
from socket import *

# 准备一些IO操作对象
file = open('../day15/my.log', 'rb')

udp = socket(type=SOCK_DGRAM)

tcp = socket()
tcp.bind(('0.0.0.0', 1210))
tcp.listen(5)

# 监控IO
print('开始监听')
rs, ws, xs = select([udp], [file], [])
print('rlist:', rs)
print('wlist:', ws)
print('xlist:', xs)
